package lxt.action.core;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ParamTypes {

	public static final String licenseType = "驾照类型";
	public static final String truckType = "车辆类型";
	public static final String petrolType = "加油类型";
	public static final String unitType = "运货单位";
	
	public static List<Map<String, String>> getParamTypes() {
		List<Map<String, String>> list = new ArrayList<Map<String, String>>();
		Field[] fields = ParamTypes.class.getDeclaredFields();
		for (int i = 0; i < fields.length; i++) {
			Map<String, String> map = new HashMap<String, String>();
			try {
				map.put("key", fields[i].getName());
				map.put("value", fields[i].get(ParamTypes.class).toString());
				list.add(map);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return list;
	}
}
